<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="../vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<child>
				<p>p1</p><p>p2</p>
			</child>
		</div>
	</body>
</html>

<script type="text/x-template" id="tpl">
	<div>
		<slot></slot>	
	</div>
</script>
<script type="text/javascript">
	const child = {
		// slot默认值
		template: `#tpl`,
		created(){
			// 父元素传过来的节点
			console.log(this.$slots.default);
		}
	}
	
	new Vue({
		el: '#app',
		components: {
			child
		}
	})
</script>